package com.qf.controller;


import com.qf.entity.Organ;
import com.qf.service.Impl.OrganServiceImpl;
import com.qf.service.OrganService;
import com.qf.util.Constants;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;


@WebServlet("/organ")
public class OrganController extends BaseController {
    public String showOrgan(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        OrganService organService = new OrganServiceImpl();
        List<Organ> organList = organService.selectAllOrgan();
        request.setAttribute("organList", organList);
        return Constants.FORWARD + "/edit.jsp";
    }
}
